package be.bonamis.umpire.domain.quiz;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

@Entity
public class Question implements Serializable {

	private static final long serialVersionUID = 803967557180655200L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private long id;

	private String questionFr;
	private String questionNl;

	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
	private Collection<Answer> answers;

	public Question() {
		answers = new ArrayList<Answer>();
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getQuestionFr() {
		return questionFr;
	}

	public void setQuestionFr(String questionFr) {
		this.questionFr = questionFr;
	}

	public String getQuestionNl() {
		return questionNl;
	}

	public void setQuestionNl(String questionNl) {
		this.questionNl = questionNl;
	}

	public Collection<Answer> getAnswers() {
		return answers;
	}

	public void setAnswers(Collection<Answer> answers) {
		this.answers = answers;
	}

}
